package com.bmps.springcloud.insuredmicroservice.model.cancel.coresystem;

import com.thoughtworks.xstream.annotations.XStreamImplicit;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;
import java.util.List;

/**
 * description:
 * 请求核心系统报文体
 *
 * @author jackdaw
 * @date 2019-11-29 10:23
 */
public class RequestBodyModel implements Serializable {

    private static final long serialVersionUID = 8548345776879836695L;
    @XStreamImplicit(itemFieldName ="PrtNos")
    private List<PrtNoModel> prtNos;

    public List<PrtNoModel> getPrtNos() {
        return prtNos;
    }

    public void setPrtNos(List<PrtNoModel> prtNos) {
        this.prtNos = prtNos;
    }

    @Override
    public String toString() {
        return "RequestBodyModel{" +
                "prtNos=" + prtNos +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (!(o instanceof RequestBodyModel)) {
            return false;
        }

        RequestBodyModel that = (RequestBodyModel) o;

        return new EqualsBuilder()
                .append(prtNos, that.prtNos)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(prtNos)
                .toHashCode();
    }
}
